package route

import (
	"github.com/gin-gonic/gin"
	"github.com/swaggo/gin-swagger"
	"github.com/swaggo/gin-swagger/swaggerFiles"
	_ "superTools-backend/docs"
	"superTools-backend/handler"
	"superTools-backend/handler/v1"
)

/**
* @Author: super
* @Date: 2020-08-21 21:44
* @Description:
**/

// Router : 网关api路由
func Router() *gin.Engine {
	router := gin.New()

	router.Use(gin.Logger())

	router.Use(gin.Recovery())

	gin.SetMode("debug")

	router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
	//router.GET("/auth", handler.GetAuth)

	apiv1 := router.Group("/api/v1")
	//apiv1.Use(jwt.JWT())
	{
		//获取二维码
		apiv1.GET("/qrcode", v1.GetQRcode)
	}

	router.GET("/test", handler.HelloRouter)

	return router
}
